package com.ys.otms.controller;

import com.ys.otms.services.IBusinessAnalysisServices;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/BA")
public class BusinessAnalysisController {

    private static Logger logger = LoggerFactory.getLogger(BusinessAnalysisController.class);

    @Autowired
    private IBusinessAnalysisServices iBusinessAnalysisServices;

    @RequestMapping("/queryZYInfo")
    @ResponseBody
    public JSONObject queryZYInfo(HttpServletRequest request) {
        logger.info("BusinessAnalysisController queryZYInfo start");
        return iBusinessAnalysisServices.queryZYInfo(request);
    }

    @RequestMapping("/querySZYLRank")
    @ResponseBody
    public JSONObject querySZYLRank(HttpServletRequest request) {
        logger.info("BusinessAnalysisController querySZYLRank start");
        return iBusinessAnalysisServices.querySZYLRank(request);
    }

    @RequestMapping("/queryHSLRank")
    @ResponseBody
    public JSONObject queryHSLRank(HttpServletRequest request) {
        logger.info("BusinessAnalysisController queryHSLRank start");
        return iBusinessAnalysisServices.queryHSLRank(request);
    }

    @RequestMapping("/queryFHLRank")
    @ResponseBody
    public JSONObject queryFHLRank(HttpServletRequest request) throws Exception {
        logger.info("BusinessAnalysisController queryFHLRank start");
        return iBusinessAnalysisServices.queryFHLRank(request);
    }
}
